<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>添加连招</title>
</head>
<body>
<form class="layui-form" lay-filter="layui-form">
    <div class="mainBox">
        <div class="main-container">

            <div class="layui-form-item">
                <label class="layui-form-label">
                    <text title="必填项" style="color:red;">*</text>
                    角色</label>
                <div class="layui-input-block">
                    <div class="xmSelect"
                         data-name="hero_id"
                         data-sourceType="route"
                         data-source="/admin.wz.hero/list"
                         data-textField="name"
                         data-valueField="id"
                         data-radio="true"
                         data-layVerify="required"
                    ></div>
                </div>
            </div>

            <div class="layui-form-item">
                <blockquote class="layui-elem-quote">连招方案1</blockquote>
                <label class="layui-form-label">
                    连招1</label>
                    <div class="layui-input-block">
                        <input type="text" name="comb_one" autocomplete="off" placeholder="请输入连招"
                               class="layui-input">
                    </div>
                <div class="layui-inline">
                    <label class="layui-form-label two-part-label">连招1释放时机</label>
                    <div class="layui-input-block" style="width: 400px">
                            <textarea name="description_one" placeholder="请输入连招1释放时机" class="layui-textarea"
                                      lay-verify="remark"></textarea>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <blockquote class="layui-elem-quote">连招方案2</blockquote>
                <label class="layui-form-label">
                    连招2</label>
                <div class="layui-input-block">
                    <input type="text" name="comb_two" autocomplete="off" placeholder="请输入连招"
                           class="layui-input">
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label two-part-label">连招2释放时机</label>
                    <div class="layui-input-block" style="width: 400px">
                            <textarea name="description_two" placeholder="请输入连招1释放时机" class="layui-textarea"
                                      lay-verify="remark"></textarea>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <blockquote class="layui-elem-quote">连招方案3</blockquote>
                <label class="layui-form-label">
                    连招3</label>
                <div class="layui-input-block">
                    <input type="text" name="comb_three" autocomplete="off" placeholder="请输入连招"
                           class="layui-input">
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label two-part-label">连招3释放时机</label>
                    <div class="layui-input-block" style="width: 400px">
                            <textarea name="description_three" placeholder="请输入连招1释放时机" class="layui-textarea"
                                      lay-verify="remark"></textarea>
                    </div>
                </div>
            </div>


        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button type="submit" class="laytp-btn laytp-btn-primary laytp-btn-sm" lay-submit="" lay-filter="add">
                <i class="layui-icon layui-icon-ok"></i>
                提交
            </button>
            <button type="reset" class="laytp-btn laytp-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div>
</form>
<script>
    if (localStorage.getItem("staticDomain")) {
        document.write("<link rel='stylesheet' href='" + localStorage.getItem("staticDomain") + "/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/layui/layui.js?v=" + localStorage.getItem("version") + "'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/laytp/layuiConfig.js?v=" + localStorage.getItem("version") + "'><\/script>");
    } else {
        document.write("<link rel='stylesheet' href='/static/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='/static/component/layui/layui.js?v=" + localStorage.getItem("version") + "'><\/script>");
        document.write("<script src='/static/component/laytp/layuiConfig.js?v=" + localStorage.getItem("version") + "'><\/script>");
    }
</script>
<script>
    layui.use(['laytp'], function () {
        //获取参数ID
        layui.form.on('submit(add)', function (data) {
            var btnAnim = layui.button.load({elem: $(this)});
            facade.ajax({
                route: '/admin.wz.combo/add',
                data: data.field
            }).done(function (res) {
                if (res.code === 0) {
                    parent.layui.layer.close(parent.layui.layer.getFrameIndex(window.name));//关闭当前页
                    parent.layui.table.reload("laytp-table");
                }
                btnAnim.stop();
            }).fail(function () {
                btnAnim.stop();
            });
            return false;
        });
    })
</script>
</body>
</html>